package com.angel.bo.message.controller;


import com.angel.bo.beans.message.AngelMessage;
import com.angel.bo.common.msg.WebReturn;
import com.angel.bo.message.service.AngelMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: Haibo.Mei [Haibo.Mei@ge.com]
 * @Description:
 * @Date: 10:01 2018/3/5
 */
@RestController
@RequestMapping("/message")
@Api(value = "AngelMessageController",description = "消息推送服务")
public class AngelMessageController {

    @Autowired
    private AngelMessageService angelMessageService;


    @ResponseBody
    @RequestMapping(value = "/sendMessage",method = RequestMethod.POST)
    @ApiImplicitParam(paramType="header", name = "client-token", value = "客户端Token", dataType = "String")
    @ApiOperation(value = "发送消息",tags = "发送消息")
    public WebReturn sendMessage(@RequestBody AngelMessage message){

        return angelMessageService.sendMessage(message);

    }

}
